<?php
/**
 * The loop that displays posts.
 *
 * The loop displays the posts and the post content. See
 * http://codex.wordpress.org/The_Loop to understand it
 *
 * This can be overridden in child themes with loop.php or
 * loop-template.php, where 'template' is the loop context
 * requested by a template. For example, loop-index.php would
 * be used if it exists and we ask for the loop with:
 * <code>get_template_part( 'loop', 'index' );</code>
 *
 * @package WordPress
 * @subpackage tpfud_theme
 *
 */
?>

<?php
	if (have_posts()) : ?>
	<?php while (have_posts()) : the_post();?>
		<div class="post" id="post-<?php the_ID(); ?>">
			<div class="wrapperimg"></div>
			<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>


							<?php  
								if ( has_post_thumbnail() ) { 
									echo '<div class="alignleft border">'. get_the_post_thumbnail() . '</div><br />';
								}
							?>			
			<?php the_excerpt();
			//edit_post_link('<br />[Редактировать запись]');
			echo '<br /></div><br />';
	endwhile; 
		?>
	<div class="wrapperimg"></div>
	<div class="navigation">
		<?php if(!function_exists('wp_pagenavi')) : ?>      
	            <div class="float-left"><?php next_posts_link('&larr; Предыдущие записи'); ?></div>
		        <div class="float-right"><?php previous_posts_link('Следующие записи &rarr;'); ?></div>
				<div class="clear"></div>
        <?php else : wp_pagenavi(); endif; ?>
	</div>
<?php endif; ?>